package cn.zhuangcloud.newversion.login;

import com.jfinal.aop.Interceptor;
import com.jfinal.aop.Invocation;
import com.jfinal.core.Controller;

public class LoginInterceptor implements Interceptor {

    @Override
    public void intercept(Invocation inv) {
        Controller c = inv.getController();
        if (c.getRequest().getMethod().equalsIgnoreCase("post")) {
            c.forwardAction("/login/doLogin");
        }else{
            inv.invoke();
        }
    }

}
